/*
 *
 * WeatherException
 *
 * Copyright 2008-2009 Centro Andaluz de Innovación y Tecnologías de la
 * Información y las Comunicaciones (CITIC). All Rights Reserved.
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
 *
 * Please contact CITIC - Edificio CITIC, C/ Marie Curie, 6 Parque
 * Tecnológico de Andalucía 29590 - Campanillas, Málaga, Spain
 * or visit www.citic.es, if you need additional information or
 * have any questions.
 */

package es.citic.puedes.weatherservice;

public class WeatherException extends Throwable {

	private static final long serialVersionUID = 1L;
	private String message;
	private Throwable cause;

	/**
	 * Creates a WeatherException with a message and a cause. 
	 * 
	 * @param message
	 *            message of the exception
	 * @param cause
	 *            contains the cause of the exception
	 */
	
	public WeatherException(String message, Throwable cause) {
		this.message = message;
		this.cause = cause;
	}

	/**
	 * Creates a WeatherException with a message. 
	 * 	
	 * @param message message of the exception
	 */
	
	public WeatherException(String message) {
		this.message = message;
	}

	/**
	 * Creates a WeatherException with a cause. 
	 * 
	 * @param cause
	 *            the cause of the exception
	 */
	public WeatherException(Throwable cause) {
		this.cause = cause;
	}

	/**
	 * Gets the message of the exception. 	
	 * @return the message of the exception
	 */
	public String getMessage() {
		return this.message;
	}

	/**
	 * Gets the cause of the exception.
	 * 
	 * @return the cause of the exception
	 */
	public Throwable getCause() {
		return this.cause;
	}

}
